/*
 * Decompiled with CFR 0.152.
 */
package com.dmtt.util;

import java.util.List;

public class PageManager {
    private int total;
    private List root;
    private int start;
    private int limit;
    private String wheres;
    private int currentPage;
    private int currentResult;
    private int totalPage;

    public int getCurrentPage() {
        return this.currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getCurrentResult() {
        this.currentResult = (this.getCurrentPage() - 1) * this.getLimit();
        if (this.currentResult < 0) {
            this.currentResult = 0;
        }
        return this.currentResult;
    }

    public void setCurrentResult(int currentResult) {
        this.currentResult = currentResult;
    }

    public int getTotalPage() {
        this.totalPage = this.total % this.limit == 0 ? this.total / this.limit : this.total / this.limit + 1;
        return this.totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getTotal() {
        return this.total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List getRoot() {
        return this.root;
    }

    public void setRoot(List root) {
        this.root = root;
    }

    public int getStart() {
        return this.start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getLimit() {
        return this.limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public String getWheres() {
        return this.wheres;
    }

    public void setWheres(String wheres) {
        this.wheres = wheres;
    }

    public String toString() {
        return String.valueOf(this.start) + " " + this.total + " " + this.root;
    }
}
